<template>
  <div class="company_page">
    <div class="login_box">
      <div class="title">{{company}}</div>
      <el-input v-model.number="mobile" maxlength="11" placeholder="请输入您的手机进行登记"></el-input>
      <el-button type="primary" class="btn" round :disabled="!mobile" @click="saveInfo()">登记</el-button>
    </div>

    <!-- 提示弹框 开始 -->
    <!-- <div class="showDialog" v-show="showDialog">
        <div class="blk"></div>
        div
    </div> -->
    <!-- 提示弹框 end -->

  </div>
</template>
<script>
import { showModal, showToast } from "@/utils/util";
import { SAVE_ORG_CUSTOMER } from "@/http/customer";
export default {
  data() {
    return {
      company: "",
      mobile: "",
      orgId: "",
    };
  },
  mounted() {
    let o = this.$route.query;
    this.company = o.nickName;
    this.orgId = o.orgId;
    console.log(o);
  },
  methods: {
    // 保存
    saveInfo() {
      let oParams = {};
      oParams.orgId = this.orgId;
      oParams.mobile = this.mobile;
      SAVE_ORG_CUSTOMER(oParams).then((res) => {
        if (res.code == 200) {
          showToast({
            message: res.message,
            type: "success",
          });
        }
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.company_page {
  position: relative;
  text-align: center;
  //   display: flex;
  //   flex-direction: column;
  //   align-items: center;
  //   justify-content: center;
  height: 100vh;
  padding-top: 100px;
  box-sizing: border-box;
  .login_box {
    padding: 10px 30px;
    .title {
      font-size: 20px;
      margin-bottom: 60px;
    }
    .btn {
      width: 80%;
      margin: 40px 0;
    }
  }
}
</style>